package drytools.icefaces.examplesbeans.inputText;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

import javax.faces.event.ActionEvent;

public class InputTextBean {
	String stringValue = "";
	StringBuffer stringBuffer = new StringBuffer();
	boolean primitiveBoolean;
	Boolean objectBoolean = new Boolean(true);
	byte byteValue;
	int intValue;
	long longValue;
	char charValue;
	Date dateValue;
	double doubleValue;
	float floatValue;
	BigDecimal bigDecimalValue = new BigDecimal(0);
	BigInteger bigIntegerValue = new BigInteger("0");

	// helpfull members
	boolean disabled = false;
	String lastIdActivated = null;
	
	public String getStringValue() {
		return stringValue;
	}

	public void setStringValue(String stringValue) {
		this.stringValue = stringValue;
	}

	public StringBuffer getStringBuffer() {
		return stringBuffer;
	}

	public void setStringBuffer(StringBuffer stringBuffer) {
		this.stringBuffer = stringBuffer;
	}

	public boolean isPrimitiveBoolean() {
		return primitiveBoolean;
	}

	public void setPrimitiveBoolean(boolean primitiveBoolean) {
		this.primitiveBoolean = primitiveBoolean;
	}

	public Boolean getObjectBoolean() {
		return objectBoolean;
	}

	public void setObjectBoolean(Boolean objectBoolean) {
		this.objectBoolean = objectBoolean;
	}

	public byte getByteValue() {
		return byteValue;
	}

	public void setByteValue(byte byteValue) {
		this.byteValue = byteValue;
	}

	public int getIntValue() {
		return intValue;
	}

	public void setIntValue(int intValue) {
		this.intValue = intValue;
	}

	public long getLongValue() {
		return longValue;
	}

	public void setLongValue(long longValue) {
		this.longValue = longValue;
	}

	public char getCharValue() {
		return charValue;
	}

	public void setCharValue(char charValue) {
		this.charValue = charValue;
	}

	public Date getDateValue() {
		return dateValue;
	}

	public void setDateValue(Date dateValue) {
		this.dateValue = dateValue;
	}

	public double getDoubleValue() {
		return doubleValue;
	}

	public void setDoubleValue(double doubleValue) {
		this.doubleValue = doubleValue;
	}

	public float getFloatValue() {
		return floatValue;
	}

	public void setFloatValue(float floatValue) {
		this.floatValue = floatValue;
	}

	public BigDecimal getBigDecimalValue() {
		return bigDecimalValue;
	}

	public void setBigDecimalValue(BigDecimal bigDecimalValue) {
		this.bigDecimalValue = bigDecimalValue;
	}

	public BigInteger getBigIntegerValue() {
		return bigIntegerValue;
	}

	public void setBigIntegerValue(BigInteger bigIntegerValue) {
		this.bigIntegerValue = bigIntegerValue;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	public String getLastIdActivated() {
		return lastIdActivated;
	}

	public void setLastIdActivated(String lastIdActivated) {
		this.lastIdActivated = lastIdActivated;
	}

	public void submit() {
		System.out.println("in submit");
	}

	public void disable() {
		disabled = true;
	}

	public void enable() {
		disabled = false;
	}
	public void action() {
		System.out.println("in action");
		setLastIdActivated("action happend");
	}
	
	public void actionOccured(ActionEvent event) {
		System.out.println("in actionOccured");
		setLastIdActivated(event.getComponent().getId());
	}
	
	public InputTextBean() {
	}
} // end of class
